package com.doeis.uwork.entity;

import java.util.List;

import com.doeis.minaserver.dao.User;
import com.voland.core.annotation.Associate;
import com.voland.core.annotation.Table;
import com.voland.core.db.Entity;
import com.voland.core.validator.NotNull;

@Table(name="hn_msg_authority")
public class HnMsgAuthority extends Entity {

	private String id;
	private String switchboard_id;
	@NotNull(message="权限名称不能为空")
	private String name;
	@NotNull(message="关联人员不能为空")
	private String msg_user_id;
	private String level;
	private String parent_id;
	private String description;
	private Boolean status;
	
	@Associate
	private User user;
	@Associate
	private List<User> users;

	public String getId(){
		return id;
	}
	public void setId(String id){
		this.id = id;
	}

	public String getSwitchboard_id(){
		return switchboard_id;
	}
	public void setSwitchboard_id(String switchboard_id){
		this.switchboard_id = switchboard_id;
	}

	public String getName(){
		return name;
	}
	public void setName(String name){
		this.name = name;
	}

	public String getLevel(){
		return level;
	}
	public void setLevel(String level){
		this.level = level;
	}

	public String getParent_id(){
		return parent_id;
	}
	public void setParent_id(String parent_id){
		this.parent_id = parent_id;
	}

	public String getDescription(){
		return description;
	}
	public void setDescription(String description){
		this.description = description;
	}

	public Boolean getStatus(){
		return status;
	}
	public void setStatus(Boolean status){
		this.status = status;
	}


	public List<User> getUsers() {
		return users;
	}
	public void setUsers(List<User> users) {
		this.users = users;
	}
	public String getMsg_user_id() {
		return msg_user_id;
	}
	public void setMsg_user_id(String msg_user_id) {
		this.msg_user_id = msg_user_id;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@Override
	public String toString() {
		return "HnMsgAuthority [id=" + id + ", switchboard_id="
				+ switchboard_id + ", name=" + name + ", msg_user_id="
				+ msg_user_id + ", level=" + level + ", parent_id=" + parent_id
				+ ", description=" + description + ", status=" + status
				+ ", user=" + user + ", users=" + users + "]";
	}
}